/**
 * 读取文件文本
 * @param data 文件内容
 * @param charset 字符编码
 */
export default function ReadBlobString(data: Blob, charset: string): Promise<string> {
	return new Promise((Send, Error) => {
		const reader = new FileReader();
		reader.readAsText(data, charset);
		reader.onload = function () { Send(reader.result as string); }
		reader.onerror = function (err) { Error(err); };
	});
}
